Autonomic Traffic Load Balancing in Link Aggregation Groups

ABSTRACT

Mechanisms are provided for performing traffic load balancing on ingress traffic directed to a Link Aggregation Group (LAG). The mechanisms monitor a ingress traffic load across a plurality of links of the Link Aggregation Group (LAG). The mechanisms determine if the ingress traffic load across the plurality of links is unbalanced. Moreover, the mechanisms, in response to determining that the ingress traffic load across the plurality of links is unbalanced, send a message to a switch associated with the LAG requesting the switch to modify routing of ingress traffic to the LAG to perform ingress traffic load balancing.

BACKGROUND

The present application relates generally to an improved data processingapparatus and method and more specifically to mechanisms for autonomictraffic load balancing in link aggregation groups.

A physical network is typically abstracted at the endpoints foravailability and scalability purposes. Both availability and scalabilityare addressed by providing Link Aggregation Groups (LAGs). Linkaggregation is a computer networking term used to describe variousmethods of combining, or aggregating, multiple network connections inparallel to increase throughput beyond what a single connection couldsustain, and to provide redundancy in case one of the links fails. Suchlink aggregation may be implemented at any of the lowest three levels ofthe Open Systems Interconnection (OSI) model. Examples of aggregation atlayer 1 (physical layer) are power line and wireless network devicesthat combine multiple frequency bands. OSI layer 2 (data link layer)aggregation typically occurs across switch ports, which can be eitherphysical ports or virtual ports managed by an operating system. OSIlayer 3 (network layer) aggregation is possible using round-robinscheduling, or hash value based scheduling, a combination, or the like.

The combining of links can either occur such that multiple interfacesshare one logical address (e.g., IP address) or one physical address(e.g., MAC address), or it can be done such that each interface has itsown address. The former requires that both ends of a link use the sameaggregation method, but has performance advantages over the latter. Onestandard for performing link aggregation is specified in the LinkAggregation Control Protocol (LACP).

A Link Aggregation Group (LAG) is a group of links that have beenaggregated together forming a group of links. A LAG is generally coupledto one or more switches of a switch fabric in a network. With regard toavailability, a LAG allows a network adapter/link error to be confinedto the network adapter/interface domain, where the “interface” is theabstraction of the group of links as a single link. With regard toscalability, the grouping of multiple physical links into one abstractedinterface, e.g., a single Etherchannel representing a plurality ofphysical links, allows for aggregate latency and throughput performanceimprovements. In both cases, the user space applications are notparticipants in determining the interface or switch fabric behavior.

SUMMARY

In one illustrative embodiment, a method, in a device comprising aprocessor, for performing traffic load balancing on ingress trafficdirected to a Link Aggregation Group (LAG). The method comprisesmonitoring, by the device, an ingress traffic load across a plurality oflinks of the Link Aggregation Group (LAG). The method further comprisesdetermining, by the device, if the ingress traffic load across theplurality of links is unbalanced. Moreover, the method comprises, inresponse to determining that the ingress traffic load across theplurality of links is unbalanced, sending, by the device, a message to aswitch associated with the LAG requesting the switch to modify routingof ingress traffic to the LAG to perform ingress traffic load balancing.

In other illustrative embodiments, a computer program product comprisinga computer useable or readable medium having a computer readable programis provided. The computer readable program, when executed on a computingdevice, causes the computing device to perform various ones of, andcombinations of, the operations outlined above with regard to the methodillustrative embodiment.

In yet another illustrative embodiment, a system/apparatus is provided.The system/apparatus may comprise link aggregation logic, monitoringlogic, and traffic load balancing logic, each of which are configured toperform respective ones, or combinations of, the operations of themethod described above. In some illustrative embodiments, thesystem/apparatus may comprise one or more processor and a memory coupledto the one or more processors. The memory may comprise instructionswhich, when executed by the one or more processors, cause the one ormore processors to perform various ones of, and combinations of, theoperations outlined above with regard to the method illustrativeembodiment.

These and other features and advantages of the present invention will bedescribed in, or will become apparent to those of ordinary skill in theart in view of, the following detailed description of the exampleembodiments of the present invention.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

The invention, as well as a preferred mode of use and further objectivesand advantages thereof, will best be understood by reference to thefollowing detailed description of illustrative embodiments when read inconjunction with the accompanying drawings, wherein:

FIG. 1 is an example diagram of a distributed data processing system inwhich aspects of the illustrative embodiments may be implemented;

FIG. 2 is an example block diagram of a computing device in whichaspects of the illustrative embodiments may be implemented;

FIG. 3 is an example diagram of the link aggregation group during normaloperation when traffic is balanced across the links;

FIG. 4 illustrates a condition in which the traffic flowing from theswitch to the Link Aggregation Group (LAG) becomes unbalanced;

FIG. 5 is an example diagram of a Link Aggregation Control Protocol(LACP) header of an LACP message in accordance with one illustrativeembodiment; and

FIG. 6 is a flowchart outlining an example operation for performingingress traffic balancing in accordance with one illustrativeembodiment.

DETAILED DESCRIPTION

As mentioned above, one mechanism for increasing the reliability andthroughput of network connections is to use link aggregation andaggregate a plurality of links into a Link Aggregation Group (LAG). Aproblem arises, however, under current aggregation models, in that theload distribution among the traffic flows (flow of data, data packets,frames, etc. from one element to another) and adapters in use isdetermined by tuples, e.g., a tuple of source address, source port,destination address, and destination port. The lack of sufficiententropy in the active tuple space is the key determinant to unbalanceddistribution of traffic on ingress flows, i.e. from the switch to theLAG. Entropy, in this context, refers to a measure of randomness where ahigh port entropy allows distribution of connections uniformly acrossall available ports in a LAG without any skew. Because links arespecified in terms of tuples, even when link aggregation is utilized,traffic of a particular link tends to go through a single port ratherthan multiple ports so as to avoid out-of-order packets, leading to alack of sufficient entropy. The particular port to which the traffic isdirected is determined before the traffic arrives at the network adapterof the host system and thus, is not able to be controlled by the hostsystem. For example, a hashing algorithm may be utilized by the switchesof the network to take fields of a packet and generate a hash index thatpoints to a particular hash bucket identifying a corresponding port withwhich the connection is associated.

The egress distribution, i.e. from the LAG to the switch, is softwarecontrolled where software executing on the host system can ensure propertraffic distribution among the links of the LAG by performing loadbalancing operations. Thus, the ingress flow traffic balance is outsidethe control of the LAG mechanisms of the host even though egress trafficcontrol is within the control of such LAG mechanisms. The switch towhich the LAG is coupled is bound to the tuple constraints to ensure noout of order processing occurs on the LAG side. It would be beneficialto have a mechanism which allows the LAG to indicate to the switch howand when to perform rebalancing of the ingress flows such that optimalperformance is obtained regardless of the particular traffic flows.

The illustrative embodiments provide mechanisms for autonomic trafficload balancing in link aggregation groups (LAGs). With the mechanisms ofthe illustrative embodiments, a LAG coordinates with an associatedswitch to negotiate graceful transition of ingress traffic flows amongthe members of the LAG. In some illustrative embodiments, the LinkAggregation Control Protocol (LACP) is extended to include extensionfields to allow for passing information to the switch to indicate theoptions for ingress traffic rebalancing. With the mechanisms of theillustrative embodiments, the balancing of the ingress traffic is underthe control of the LAG by providing extended fields in heartbeatmessages that are constantly flowing between the switch and the LAG.These extended fields contain information about which links in the LAGare being overused. The extended fields may further contain informationabout which links in the LAG are links to which traffic that isotherwise mapped to the overused link should be redirected. The switchuses this information when routing traffic to reroute traffic from theoverused link in the LAG to the desired link in the LAG. In this way,the ingress traffic is rebalanced under the control of the LAG of thehost system.

The illustrative embodiments provide relief in situations where thenetwork performance bottleneck is seen at an endpoint, i.e. source ordestination computing device. The illustrative embodiments allow asystem administrator to reduce network pressure by adding more adaptersto the LAG, e.g., an Etherchannel. The load balancing of theillustrative embodiments is achieved without requiring measures ofvarious metrics on the communication devices to assure port entropy.Furthermore, the illustrative embodiments do not suffer fromout-of-order packet issues that plague round-robin load balancingmethods.

The above aspects and advantages of the illustrative embodiments of thepresent invention will be described in greater detail hereafter withreference to the accompanying figures. It should be appreciated that thefigures are only intended to be illustrative of exemplary embodiments ofthe present invention. The present invention may encompass aspects,embodiments, and modifications to the depicted exemplary embodiments notexplicitly shown in the figures but would be readily apparent to thoseof ordinary skill in the art in view of the present description of theillustrative embodiments.

As will be appreciated by one skilled in the art, aspects of the presentinvention may be embodied as a system, method, or computer programproduct. Accordingly, aspects of the present invention may take the formof an entirely hardware embodiment, an entirely software embodiment(including firmware, resident software, micro-code, etc.) or anembodiment combining software and hardware aspects that may allgenerally be referred to herein as a “circuit,” “module” or “system.”Furthermore, aspects of the present invention may take the form of acomputer program product embodied in any one or more computer readablemedium(s) having computer usable program code embodied thereon.

Any combination of one or more computer readable medium(s) may beutilized. The computer readable medium may be a computer readable signalmedium or a computer readable storage medium. A computer readablestorage medium is a system, apparatus, or device of an electronic,magnetic, optical, electromagnetic, or semiconductor nature, anysuitable combination of the foregoing, or equivalents thereof. Morespecific examples (a non-exhaustive list) of the computer readablestorage medium would include the following: an electrical device havinga storage capability, a portable computer diskette, a hard disk, arandom access memory (RAM), a read-only memory (ROM), an erasableprogrammable read-only memory (EPROM or Flash memory), an optical fiberbased device, a portable compact disc read-only memory (CDROM), anoptical storage device, a magnetic storage device, or any suitablecombination of the foregoing. In the context of this document, acomputer readable storage medium is any tangible medium that can containor store a program for use by, or in connection with, an instructionexecution system, apparatus, or device.

In some illustrative embodiments, the computer readable medium is anon-transitory computer readable medium. A non-transitory computerreadable medium is any medium that is not a disembodied signal orpropagation wave, i.e. pure signal or propagation wave per se. Anon-transitory computer readable medium may utilize signals andpropagation waves, but is not the signal or propagation wave itself.Thus, for example, various forms of memory devices, and other types ofsystems, devices, or apparatus, that utilize signals in any way, suchas, for example, to maintain their state, may be considered to benon-transitory computer readable media within the scope of the presentdescription.

A computer readable signal medium, on the other hand, may include apropagated data signal with computer readable program code embodiedtherein, for example, in a baseband or as part of a carrier wave. Such apropagated signal may take any of a variety of forms, including, but notlimited to, electro-magnetic, optical, or any suitable combinationthereof. A computer readable signal medium may be any computer readablemedium that is not a computer readable storage medium and that cancommunicate, propagate, or transport a program for use by or inconnection with an instruction execution system, apparatus, or device.Similarly, a computer readable storage medium is any computer readablemedium that is not a computer readable signal medium.

Computer code embodied on a computer readable medium may be transmittedusing any appropriate medium, including but not limited to wireless,wireline, optical fiber cable, radio frequency (RF), etc., or anysuitable combination thereof.

Computer program code for carrying out operations for aspects of thepresent invention may be written in any combination of one or moreprogramming languages, including an object oriented programming languagesuch as Java™, Smalltalk™, C++, or the like, and conventional proceduralprogramming languages, such as the “C” programming language or similarprogramming languages. The program code may execute entirely on theuser's computer, partly on the user's computer, as a stand-alonesoftware package, partly on the user's computer and partly on a remotecomputer, or entirely on the remote computer or server. In the latterscenario, the remote computer may be connected to the user's computerthrough any type of network, including a local area network (LAN) or awide area network (WAN), or the connection may be made to an externalcomputer (for example, through the Internet using an Internet ServiceProvider).

Aspects of the present invention are described below with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems) and computer program products according to the illustrativeembodiments of the invention. It will be understood that each block ofthe flowchart illustrations and/or block diagrams, and combinations ofblocks in the flowchart illustrations and/or block diagrams, can beimplemented by computer program instructions. These computer programinstructions may be provided to a processor of a general purposecomputer, special purpose computer, or other programmable dataprocessing apparatus to produce a machine, such that the instructions,which execute via the processor of the computer or other programmabledata processing apparatus, create means for implementing thefunctions/acts specified in the flowchart and/or block diagram block orblocks.

These computer program instructions may also be stored in a computerreadable medium that can direct a computer, other programmable dataprocessing apparatus, or other devices to function in a particularmanner, such that the instructions stored in the computer readablemedium produce an article of manufacture including instructions thatimplement the function/act specified in the flowchart and/or blockdiagram block or blocks.

The computer program instructions may also be loaded onto a computer,other programmable data processing apparatus, or other devices to causea series of operational steps to be performed on the computer, otherprogrammable apparatus, or other devices to produce a computerimplemented process such that the instructions which execute on thecomputer or other programmable apparatus provide processes forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks.

The flowchart and block diagrams in the figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof code, which comprises one or more executable instructions forimplementing the specified logical function(s). It should also be notedthat, in some alternative implementations, the functions noted in theblock may occur out of the order noted in the figures. For example, twoblocks shown in succession may, in fact, be executed substantiallyconcurrently, or the blocks may sometimes be executed in the reverseorder, depending upon the functionality involved. It will also be notedthat each block of the block diagrams and/or flowchart illustration, andcombinations of blocks in the block diagrams and/or flowchartillustration, can be implemented by special purpose hardware-basedsystems that perform the specified functions or acts, or combinations ofspecial purpose hardware and computer instructions.

Thus, the illustrative embodiments may be utilized in many differenttypes of data processing environments. In order to provide a context forthe description of the specific elements and functionality of theillustrative embodiments, FIGS. 1 and 2 are provided hereafter asexample environments in which aspects of the illustrative embodimentsmay be implemented. It should be appreciated that FIGS. 1 and 2 are onlyexamples and are not intended to assert or imply any limitation withregard to the environments in which aspects or embodiments of thepresent invention may be implemented. Many modifications to the depictedenvironments may be made without departing from the spirit and scope ofthe present invention.

FIG. 1 depicts a pictorial representation of an example distributed dataprocessing system in which aspects of the illustrative embodiments maybe implemented. Distributed data processing system 100 may include anetwork of computers in which aspects of the illustrative embodimentsmay be implemented. The distributed data processing system 100 containsat least one network 102, which is the medium used to providecommunication links between various devices and computers connectedtogether within distributed data processing system 100. The network 102may include connections, such as wire, wireless communication links, orfiber optic cables.

In the depicted example, server 104 and server 106 are connected tonetwork 102 along with storage unit 108. In addition, clients 110, 112,and 114 are also connected to network 102. These clients 110, 112, and114 may be, for example, personal computers, network computers, or thelike. In the depicted example, server 104 provides data, such as bootfiles, operating system images, and applications to the clients 110,112, and 114. Clients 110, 112, and 114 are clients to server 104 in thedepicted example. Distributed data processing system 100 may includeadditional servers, clients, and other devices not shown.

In the depicted example, distributed data processing system 100 is theInternet with network 102 representing a worldwide collection ofnetworks and gateways that use the Transmission ControlProtocol/Internet Protocol (TCP/IP) suite of protocols to communicatewith one another. At the heart of the Internet is a backbone ofhigh-speed data communication lines between major nodes or hostcomputers, consisting of thousands of commercial, governmental,educational and other computer systems that route data and messages. Ofcourse, the distributed data processing system 100 may also beimplemented to include a number of different types of networks, such asfor example, an intranet, a local area network (LAN), a wide areanetwork (WAN), or the like. As stated above, FIG. 1 is intended as anexample, not as an architectural limitation for different embodiments ofthe present invention, and therefore, the particular elements shown inFIG. 1 should not be considered limiting with regard to the environmentsin which the illustrative embodiments of the present invention may beimplemented.

FIG. 2 is a block diagram of an example data processing system in whichaspects of the illustrative embodiments may be implemented. Dataprocessing system 200 is an example of a computer, such as client 110 inFIG. 1, in which computer usable code or instructions implementing theprocesses for illustrative embodiments of the present invention may belocated.

In the depicted example, data processing system 200 employs a hubarchitecture including north bridge and memory controller hub (NB/MCH)202 and south bridge and input/output (I/O) controller hub (SB/ICH) 204.Processing unit 206, main memory 208, and graphics processor 210 areconnected to NB/MCH 202. Graphics processor 210 may be connected toNB/MCH 202 through an accelerated graphics port (AGP).

In the depicted example, local area network (LAN) adapter 212 connectsto SB/ICH 204. Audio adapter 216, keyboard and mouse adapter 220, modem222, read only memory (ROM) 224, hard disk drive (HDD) 226, CD-ROM drive230, universal serial bus (USB) ports and other communication ports 232,and PCI/PCIe devices 234 connect to SB/ICH 204 through bus 238 and bus240. PCI/PCIe devices may include, for example, Ethernet adapters,add-in cards, and PC cards for notebook computers. PCI uses a card buscontroller, while PCIe does not. ROM 224 may be, for example, a flashbasic input/output system (BIOS).

HDD 226 and CD-ROM drive 230 connect to SB/ICH 204 through bus 240. HDD226 and CD-ROM drive 230 may use, for example, an integrated driveelectronics (IDE) or serial advanced technology attachment (SATA)interface. Super I/O (SIO) device 236 may be connected to SB/ICH 204.

An operating system runs on processing unit 206. The operating systemcoordinates and provides control of various components within the dataprocessing system 200 in FIG. 2. As a client, the operating system maybe a commercially available operating system such as Microsoft® Windows7®. An object-oriented programming system, such as the Java™ programmingsystem, may run in conjunction with the operating system and providescalls to the operating system from Java™ programs or applicationsexecuting on data processing system 200.

As a server, data processing system 200 may be, for example, an IBM®eServer™ System p® computer system, running the Advanced InteractiveExecutive (AIX®) operating system or the LINUX® operating system. Dataprocessing system 200 may be a symmetric multiprocessor (SMP) systemincluding a plurality of processors in processing unit 206.Alternatively, a single processor system may be employed.

Instructions for the operating system, the object-oriented programmingsystem, and applications or programs are located on storage devices,such as HDD 226, and may be loaded into main memory 208 for execution byprocessing unit 206. The processes for illustrative embodiments of thepresent invention may be performed by processing unit 206 using computerusable program code, which may be located in a memory such as, forexample, main memory 208, ROM 224, or in one or more peripheral devices226 and 230, for example.

A bus system, such as bus 238 or bus 240 as shown in FIG. 2, may becomprised of one or more buses. Of course, the bus system may beimplemented using any type of communication fabric or architecture thatprovides for a transfer of data between different components or devicesattached to the fabric or architecture. A communication unit, such asmodem 222 or network adapter 212 of FIG. 2, may include one or moredevices used to transmit and receive data. A memory may be, for example,main memory 208, ROM 224, or a cache such as found in NB/MCH 202 in FIG.2.

Those of ordinary skill in the art will appreciate that the hardware inFIGS. 1 and 2 may vary depending on the implementation. Other internalhardware or peripheral devices, such as flash memory, equivalentnon-volatile memory, or optical disk drives and the like, may be used inaddition to or in place of the hardware depicted in FIGS. 1 and 2. Also,the processes of the illustrative embodiments may be applied to amultiprocessor data processing system, other than the SMP systemmentioned previously, without departing from the spirit and scope of thepresent invention.

Moreover, the data processing system 200 may take the form of any of anumber of different data processing systems including client computingdevices, server computing devices, a tablet computer, laptop computer,telephone or other communication device, a personal digital assistant(PDA), or the like. In some illustrative examples, data processingsystem 200 may be a portable computing device that is configured withflash memory to provide non-volatile memory for storing operating systemfiles and/or user-generated data, for example. Essentially, dataprocessing system 200 may be any known or later developed dataprocessing system without architectural limitation.

In accordance with the illustrative embodiments, one or more of thecomputing devices in FIG. 1 may implement link aggregation mechanismsthat implements Link Aggregation Groups (LAGs) and permits such LAGs tocontrol ingress traffic by providing mechanisms for communicatingbetween the LAGs and their associated switches to thereby inform theswitches of the manner by which the LAGs wish the switches to rebalancetraffic across the links of the LAG. For example, network adapters, suchas network adapter 212 in FIG. 2, in one or more of the servers 104, 106in FIG. 1 may implement logic and an extended Link Aggregation ControlProtocol (LACP) that is extended to implement the features of theillustrative embodiments for performing ingress traffic load balancingwith a LAG of the network adapter.

FIGS. 3-4 are example diagrams illustrating issues with regard tounbalanced traffic in a link aggregation group. FIG. 3 is an examplediagram of the link aggregation group during normal operation whentraffic is balanced across the links, i.e. no spikes in traffic haveoccurred on any of the links of the link aggregation group. As shown inFIG. 3, the link aggregation group (LAG) 310, created using the linkaggregation logic 320 (which may be implemented as software executed onhardware of the network adapter, firmware, hardware logic circuits, orany combination of the above) of the network adapter 330, comprises fourlinks 312-318 that are aggregated into the LAG 310. The links 312-318may be provided via physical of a network adapter that are coupled tothe switch 340 of a switch fabric 350. It should be appreciated that thenetwork adapter may utilize logical ports as well, but these logicalports must be coupled to the switch 340 via physical ports. Logicalports may be assigned to LAGs in a similar manner as physical portswithout departing from the spirit and scope of the illustrativeembodiments.

The links themselves may utilize any suitable communication protocol forthe particular implementation. For purposes of the description of theillustrative embodiments, it will be assumed that the links are Ethernetlinks. However, it should be appreciated that this is only an exampleand is not intended to be limiting with regard to the types of linkswith which the illustrative embodiments operate. To the contrary, othertypes of links, such as Fiber Channel, InfiniBand, and the like, may beused without departing from the spirit and scope of the illustrativeembodiments.

As mentioned above, the links 312-318 are combined into a LAG by linkaggregation logic 320 of the network adapter 330. Link aggregation isgenerally known in the art and thus, a more detailed explanation of howlink aggregation is accomplished is not provided herein. Any linkaggregation model and logic may be used to perform the actual linkaggregation and manage the link aggregation with the illustrativeembodiments enhancing the management of the link aggregation byproviding the additional functionality as described herein for balancingingress traffic of a LAG.

For purposes of the description of the illustrative embodiments, it willbe assumed that the LAG 310 is an EtherChannel comprising the pluralityof Ethernet links 312-318. EtherChannel is a port link aggregationtechnology that allows grouping of several physical Ethernet links tocreate on logical Ethernet link for purposes of providingfault-tolerance and high-speed links between switches, routers, andservers. An EtherChannel can be created from between two and eightactive Fast, Gigabit or 10-Gigabit Ethernet ports, with an additionalone to eight inactive (failover) ports which become active as the otheractive ports fail. EtherChannel is primarily used in the backbonenetwork, but can also be used to connect end user machines. While anEtherChannel is assumed for description purposes, this is not intendedto be limiting and any type of LAG 310 may be used depending on theparticular implementation desired.

As shown in FIG. 3, the traffic flowing from the switch 340 of theswitch fabric 350 into the LAG 310, i.e. ingress traffic, is balancedunder normal conditions. This is depicted in FIG. 3 as the arrowpointing from the switch 340 to the link ports (physical or logical)312-318 being all of the same thickness. That is, no link 312-318 isbeing overly utilized and no other link 312-318 is being underutilized.In such a situation, load balancing of the ingress traffic is not neededand the mechanisms of the illustrative embodiments need not perform anyrebalancing of the ingress traffic.

With reference now to FIG. 4, this figure illustrates a condition inwhich the traffic flowing from the switch 340 to the LAG 310 becomesunbalanced. This may occur, for example, when there is a burst or spikeof traffic on one of the links 312-318 of the LAG 310. For example, inthe depicted example, the traffic on link 318 experiences a spike whichis depicted as a wider or thicker arrow flowing from the switch 340 toport 318 of the LAG 310. In accordance with the illustrativeembodiments, monitoring logic 360 is provided in the network adapter 330for monitoring the load on each of the links 312-318. For example, themonitoring logic 360 may generate statistics for each of the links312-318 of the LAG 310 to determine a statistical measure of the amountof data flowing through each of the links 312-318 over a specified timequanta. These statistical measures may be further analyzed by themonitoring logic 360 to determine if the traffic of the LAG 310 isunbalanced. For example, comparisons of the statistical measures of eachof the links 312-318 for the specified time quanta may be made todetermine if one or more of the links 312-318 has a threshold amount ormore of extra traffic than another link 312-318 in the LAG 310. Othertypes of analysis may be utilized as long as the analysis results in anindication of whether the ingress traffic of a LAG is balanced orunbalanced.

The monitoring logic 360 generates a result based on its analysis as towhether the ingress traffic of the LAG 310 is unbalanced or not andprovides that result, as well as the statistical measure information forthe links 312-318 to the traffic load balancing logic 370 of the networkadapter 330. The traffic load balancing logic 370 determines the mannerby which to balance the traffic load across the links 312-318 of the LAG310. In so doing, the traffic load balancing logic 370 determines adesired LAG link and an exclude LAG link. The desired LAG link is apreferred physical link to which future traffic for the connection is tobe transitioned, e.g., a link 312-316 that has a relatively lowerstatistical measure of traffic flow for the time quanta. The exclude LAGlink is a physical link to exclude from the balancing group for thisconnection so that additional future traffic is not directed to thislink, e.g., a link 318 having a relatively high statistical measure oftraffic flow for the time quanta.

This information may be communicated back to the switch 340 so that theswitch 340 may utilize this information when routing traffic to the LAG310. That is, this information is communicated back to the switch 340along with information specifically identifying the connection withwhich the information is associated. The switch 340 receives thisinformation and updates its routing table(s) 380, e.g., its ContentAddressable Memories (CAM), to route traffic, e.g., data packets, to thedesired LAG link port and to no longer route traffic to the exclude LAGlink port. Various ways of implementing this change in the routing maybe utilized including extending the CAM table of the routing table(s)380 to include a directive field for each entry that has a pointer to adirective database that indicates a directive for routing purposes.Other implementations may be to include an invalidate bit for linkentries in the CAM table that invalidates the exclude LAG link and mayhave a different value for desired LAG links. Any implementation thatpermits the switch 340 to discern between a desired LAG link and anexclude LAG link in a LAG of a connection may be used without departingfrom the spirit and scope of the illustrative embodiments.

After updating its routing table(s) 380 data structures, the switch 340may begin routing the ingress traffic destined for the LAG 310 using theupdated routing table(s) 380. In this way, traffic is rebalanced byrerouting traffic from the overly utilized link 318 to one or more ofthe less utilized links 312-316. The network adapter 320 on the LAG 310side of the communication is responsible for buffering and synchronizingdata packets until the traffic begins to flow over the newly configuredLAG links. Hence, the balance of the ingress traffic is returned to thestate shown in FIG. 3.

In order to communicate the information from the LAG 310 side of thecommunication connection to the switch 340, e.g., from the traffic loadbalancing logic 370 of the network adapter 320 to the switch 340, amessage is transmitted by the network adapter 320 to the switch 340.Such messages may be sent continuously, periodically, or in response todetected events, e.g., in response to an unbalanced traffic load of theLAG 310 being detected. In one illustrative embodiment, the message sentto the switch 340 is a Link Aggregation Control Protocol (LACP) messagehaving the information in a LACP header associated with the LACPmessage. The LACP message may be a heartbeat message that is sent fromthe network adapter 320 to the switch 340 on a periodic basis to informthe switch 340 that the connections with the network adapter 320 arestill live. The illustrative embodiments may utilize reserved fields ofthe LACP header that are not being utilized for communicating otherinformation, as a mechanism for communicating the information regardingdesired and excluded LAG links for specified connections to the switch340. Thus, a separate message for this purpose is not required and theinformation may be communicated without requiring additional fields orlarge payloads in the LACP message.

FIG. 5 is an example diagram of a LACP header of an LACP message inaccordance with one illustrative embodiment. As shown in FIG. 5, theLACP header 500 comprises a plurality of fields, the majority of whichare utilized for their standard purposes as specified in the LACPspecification. As shown in FIG. 5, fields 510 and 520, in the LACPspecification, are reserved fields for the actor (the entity initiatingcommunication and performing actions), and the partner, respectively.These fields may be 3 bytes in size in the current LACP specification.However, in accordance with the illustrative embodiments, these fields510 and 520 are repurposed to store the traffic load balancinginformation 530 that is communicated by the network adapter to theswitch for purposes of performing ingress traffic load balancing for aLAG. For example, a tuple value and unique token value (describedhereafter) may be placed in field 510 and a desired/exclude LAG linkidentifiers may be placed in field 520. Of course other distributions ofthis information between fields 510 and 520 may be used withoutdeparting from the spirit and scope of the illustrative embodiments.

For example, in one illustrative embodiment, on the LAG side of thecommunication connection, each ingress tuple representing acommunication connection, e.g., source address, source port, destinationaddress, and destination port, is identified by a unique token value.This token value may be provided to the switch via a LACP extensionexchange such that the switch is informed of the correspondence betweenthe tuple and the token and this information may be stored in a routingtable data structure in the switch.

The LACP message that is transmitted from the network adapter to theswitch contains the LACP header 500 with the ingress traffic loadbalancing information contained in one or more of the fields 510 and 520of the LACP header 500. The ingress traffic load balancing informationcomprises the tuple value for the connection, i.e. the switch side valueused to identify the connection (this tuple may be generated via a tuplehashing mechanism of the switch as is generally known in the art). Theingress traffic load balancing information further comprises the uniquetoken that is generated on the LAG side to identify the connection, thedesired LAG link identifier which is the preferred physical link totransition future traffic to as determined by the traffic load balancinglogic of the network adapter, and an exclude LAG link identifier whichis the physical link to exclude from the balancing group for theconnection as determined by the traffic load balancing logic for thenetwork adapter. It should be appreciated that the token is included inthe illustrative embodiments since it is foreseeable that differentdirectives may be used for the same tuple, however in other illustrativeembodiments the tuple along may be used without the need for a token.

Thus, the LACP header 500 contains the ingress traffic load balancinginformation that is used to direct the switch to perform ingress trafficload balancing for the LAG and is communicated by the network adapter tothe switch. Such control over ingress traffic for LAGs is not availablein known load balancing mechanisms.

The LACP message containing the LACP header 500 may be a heartbeatmessage that is sent to the switch on a periodic basis to inform theswitch that the network adapter is still alive and functioning properly.Alternatively, the LACP message may be a message that is sent inresponse to an event being detected, such as the detection of unbalancedingress traffic for a LAG, for example. In accordance with theillustrative embodiments, the switch further comprises logic forconsuming the received LACP message and using the token value, desiredLAG link, and exclude LAG link as additional entropy variables whengenerating the result of the tuple hash of a data packet. That is, if adata packet is destined for the LAG and has a tuple hash that results inthe exclude LAG link being the target of the routing, then the desiredLAG link is used instead, at least until further notice from the networkadapter.

The LACP message having the LACP header 500 is sent to the switch as arequest which the switch is free to ignore if the switch does notsupport such functionality or if conditions exist that make it necessaryto ignore the request. One or more of these LACP messages may beexchanged between the network adapter and the switch, such as one foreach LAG supported by the network adapter. While a single LACP messageat a time is described above as being used to reconfigure the routing ofthe switch with regard to ingress traffic, the illustrative embodimentsare not limited to such. Rather, in some illustrative embodiments, thenetwork adapter may generate a LACP frame with multiple LACP messagesdescribing multiple connections. The switch may then batch process themessages when the LACP frame is received at the switch.

The determination of an unbalanced condition of ingress traffic of a LAGand subsequent messaging between the network adapter and the switch maybe repeated over the lifetime of the LAG to switch association, therebyproviding normalization of optimal performance traffic distribution. Themechanism of the illustrative embodiments avoid using an OSI layer 5header as it introduces application level impacts resulting inproprietary protocols. Thus, the illustrative embodiments areindependent of any mechanism which would break the standard OSI orapplication semantics.

FIG. 6 is a flowchart outlining an example operation for performingingress traffic balancing in accordance with one illustrativeembodiment. As shown in FIG. 6, the operation starts with theestablishment in a network adapter of a link aggregation group (LAG)comprising a plurality of links, each being identified by a tuple, e.g.,source address, source port, destination address, and destination port(step 610). A unique token is associated with each of the links in theLAG and communicated to the switch with which the LAG is associated(step 620). The ingress traffic of the links of the LAG is monitored andstatistical measures of the ingress traffic are generated (step 630).The statistical measures of the ingress traffic are analyzed todetermine if the ingress traffic is unbalanced across the links of theLAG (step 640).

A determination is made as to whether the ingress traffic is unbalancedfor the LAG (step 650). If not, the operation terminates. If so, then adesired LAG link and exclude LAG link are identified (step 660). Aningress traffic load balancing request is transmitted to the switchindicating the desired LAG link and exclude LAG link (step 670). Theswitch updates its routing data structures to cause data traffictargeting the exclude LAG link to be rerouted to the desired LAG linkbefore transmission to the LAG (step 680). The operation thenterminates.

It should be appreciated that while FIG. 6 illustrates the operationterminating, the operation may in fact be repeated on a continuous orperiodic basis. Moreover, it should be appreciated that while FIG. 6shows the message being transmitted in response to the determinationthat the ingress traffic is unbalanced, in other illustrativeembodiments the messages are always transmitted, but when the ingresstraffic is not unbalanced, the messages will not indicate any desired orexclude LAG links. Such an embodiment may utilize the heartbeat messagestransmitted between the network adapter and switch to accomplish themessaging, for example.

Moreover, it should be appreciated that while the illustrativeembodiments have been described with the traffic load balancing andmonitoring logic being provided in the network adapter, in otherillustrative embodiments, one or more of the logic elements may beprovided in the host system associated with the network adapter. In thisway, the host system may be involved in determining how to perform thetraffic load balancing for a LAG rather than requiring the logic to beprovided in the network adapter.

Thus, the illustrative embodiments provide mechanisms for allowing theLAG of a network adapter to control the routing of traffic to the LAG bythe network adapter. In this way, ingress traffic may be load balancedwhen it would otherwise not be able to be controlled by the LAG.

As noted above, it should be appreciated that the illustrativeembodiments may take the form of an entirely hardware embodiment, anentirely software embodiment or an embodiment containing both hardwareand software elements. In one example embodiment, the mechanisms of theillustrative embodiments are implemented in software or program code,which includes but is not limited to firmware, resident software,microcode, etc.

A data processing system suitable for storing and/or executing programcode will include at least one processor coupled directly or indirectlyto memory elements through a system bus. The memory elements can includelocal memory employed during actual execution of the program code, bulkstorage, and cache memories which provide temporary storage of at leastsome program code in order to reduce the number of times code must beretrieved from bulk storage during execution.

Input/output or I/O devices (including but not limited to keyboards,displays, pointing devices, etc.) can be coupled to the system eitherdirectly or through intervening I/O controllers. Network adapters mayalso be coupled to the system to enable the data processing system tobecome coupled to other data processing systems or remote printers orstorage devices through intervening private or public networks. Modems,cable modems and Ethernet cards are just a few of the currentlyavailable types of network adapters.

The description of the present invention has been presented for purposesof illustration and description, and is not intended to be exhaustive orlimited to the invention in the form disclosed. Many modifications andvariations will be apparent to those of ordinary skill in the art. Theembodiment was chosen and described in order to best explain theprinciples of the invention, the practical application, and to enableothers of ordinary skill in the art to understand the invention forvarious embodiments with various modifications as are suited to theparticular use contemplated.

1. A method, in a device comprising a processor, for performing trafficload balancing on ingress traffic directed to a Link Aggregation Group(LAG), the method comprising: monitoring, by the device, an ingresstraffic load across a plurality of links of the Link Aggregation Group(LAG); determining, by the device, if the ingress traffic load acrossthe plurality of links is unbalanced; and in response to determiningthat the ingress traffic load across the plurality of links isunbalanced, sending, by the device, a message to a switch associatedwith the LAG requesting the switch to modify routing of ingress trafficto the LAG to perform ingress traffic load balancing.
 2. The method ofclaim 1, wherein the message is an extended Link Aggregation ControlProtocol (LACP) message extended to include one or more fields forspecifying parameters for the ingress traffic load balancing to theswitch.
 3. The method of claim 2, wherein the parameters for the ingresstraffic load balancing comprises a first parameter identifying a firstlink in the LAG, that is an overused link in the LAG, and a secondparameter identifying a second link to which ingress traffic directed tothe overused link should be redirected.
 4. The method of claim 3,wherein the switch, in response to receiving the extended LACP message,updates a routing table in the switch to redirect ingress traffic fromthe first link to the second link.
 5. The method of claim 2, wherein theextended LACP message is a heartbeat message sent from the device to theswitch.
 6. The method of claim 2, wherein the one or more fieldscomprises a first field in a LACP header of the extended LACP messagethat is reserved for an actor, and a second field in the LACP header ofthe extended LACP message that is reserved for a partner.
 7. The methodof claim 1, wherein monitoring an ingress traffic load across aplurality of links of the LAG comprises: generating a statisticalmeasure of an amount of data flowing through each link of the LAG over aspecified time quanta; and comparing the statistical measures of each ofthe links in the LAG to each other link in the LAG to determine if onelink has a statistical measure that is equal to or greater than athreshold amount greater than the statistical measure of the otherlinks.
 8. The method of claim 1, wherein the switch, in response toreceiving the message, updates a routing table of the switch to redirectingress traffic directed to an overused link in the LAG to another linkin the LAG.
 9. The method of claim 8, wherein the routing table of theswitch is extended to include a directive field for each entry in therouting table, wherein the directive field stores a pointer to adirective database that indicates a directive for routing purposes, andwherein updating the routing table comprises updating a directive fieldof an entry in the routing table associated with the overused link topoint to a directive in the directive database to route ingress trafficto the another link.
 10. The method of claim 1, wherein the device is anetwork adapter coupled to a host system. 11-20. (canceled)